<template>
    <div>
        <breadcrumb :routerList="routerList" />
        <rules-tab :table-data="tableData" @reloadRules="reloadRules" />
    </div>
</template>

<script>
    import breadcrumb from '@/components/breadcrumb.vue'
    import rulesTab from './components/rules-tab.vue'
    export default {
        name: "integralRule",
        components: {
            breadcrumb,
            rulesTab
        },
        data() {
            return {
                routerList: [
                    {
                        path: '',
                        name: '积分管理'
                    },
                    {
                        path: '',
                        name: '积分规则'
                    }
                ],
                tableData: []
            }
        },
        created() {
            this.getRules()
        },
        methods: {
            async getRules() {
                const data =  await this.$Http.getIntegralRules()
                console.log(data)
                this.tableData = data
            },
            reloadRules() {
                this.getRules()
            }
        }
    }
</script>

<style scoped>

</style>
